/*
 * dieta_Viewfi.java
 *
 * Created on 18 de mayo de 2008, 8:42
 */
package propres;

import javax.swing.table.DefaultTableModel;
import java.util.*;
import javax.swing.*;

/**
 *
 * @author  neochange
 */

public class dieta_Viewfi extends javax.swing.JPanel {

    /** Creates new form dieta_Viewfi */
    public dieta_Viewfi(CtrlVistaCliente CVC, CtrlVistalimento CVA, CtrlVistaPreferencias CVPref,CtrlVistaplato CVP) {
        initComponents();
        CVc = CVC;
        CVa = CVA;
        CVp = CVP;
        CVd = new CtrlVistadieta(CVC, CVA, CVPref,CVp);
        mod1 = new DefaultTableModel(5, 7);
        mod1 = inicializa_modelo();
        jTable1.setModel(mod1);
        dietanum = 0;
        
        this.setName("Dieta automatica");
        
        
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jFrame1 = new javax.swing.JFrame();
        buttonGroup1 = new javax.swing.ButtonGroup();
        jLabel1 = new javax.swing.JLabel();
        jTextField1 = new javax.swing.JTextField();
        jTextField2 = new javax.swing.JTextField();
        jTextField3 = new javax.swing.JTextField();
        jTextField4 = new javax.swing.JTextField();
        jTextField5 = new javax.swing.JTextField();
        jTextField6 = new javax.swing.JTextField();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTable1 = new javax.swing.JTable();
        jButton1 = new javax.swing.JButton();
        jButton2 = new javax.swing.JButton();
        jButton3 = new javax.swing.JButton();
        jLabel4 = new javax.swing.JLabel();
        jTextField7 = new javax.swing.JTextField();
        jTextField8 = new javax.swing.JTextField();
        jTextField9 = new javax.swing.JTextField();
        jTextField10 = new javax.swing.JTextField();
        jTextField11 = new javax.swing.JTextField();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        jTextField12 = new javax.swing.JTextField();
        jButton4 = new javax.swing.JButton();
        jButton5 = new javax.swing.JButton();
        jButton6 = new javax.swing.JButton();
        jButton7 = new javax.swing.JButton();
        jLabel10 = new javax.swing.JLabel();
        jRadioButton1 = new javax.swing.JRadioButton();
        jRadioButton2 = new javax.swing.JRadioButton();
        jButton8 = new javax.swing.JButton();
        jButton9 = new javax.swing.JButton();
        jLabel11 = new javax.swing.JLabel();
        jButton10 = new javax.swing.JButton();
        jTextField13 = new javax.swing.JTextField();
        jLabel12 = new javax.swing.JLabel();
        jTextField14 = new javax.swing.JTextField();
        jLabel13 = new javax.swing.JLabel();
        jLabel14 = new javax.swing.JLabel();
        jLabel15 = new javax.swing.JLabel();
        jLabel16 = new javax.swing.JLabel();
        jCheckBox1 = new javax.swing.JCheckBox();

        jFrame1.setName("jFrame1"); // NOI18N

        javax.swing.GroupLayout jFrame1Layout = new javax.swing.GroupLayout(jFrame1.getContentPane());
        jFrame1.getContentPane().setLayout(jFrame1Layout);
        jFrame1Layout.setHorizontalGroup(
            jFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 400, Short.MAX_VALUE)
        );
        jFrame1Layout.setVerticalGroup(
            jFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 300, Short.MAX_VALUE)
        );

        buttonGroup1.add(jRadioButton1);
        buttonGroup1.add(jRadioButton2);

        setName("Dieta Automatica"); // NOI18N

        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(propres.PropresApp.class).getContext().getResourceMap(dieta_Viewfi.class);
        jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
        jLabel1.setName("jLabel1"); // NOI18N

        jTextField1.setText(resourceMap.getString("jTextField1.text")); // NOI18N
        jTextField1.setName("jTextField1"); // NOI18N

        jTextField2.setText(resourceMap.getString("jTextField2.text")); // NOI18N
        jTextField2.setName("jTextField2"); // NOI18N

        jTextField3.setText(resourceMap.getString("jTextField3.text")); // NOI18N
        jTextField3.setName("jTextField3"); // NOI18N

        jTextField4.setText(resourceMap.getString("jTextField4.text")); // NOI18N
        jTextField4.setName("jTextField4"); // NOI18N

        jTextField5.setText(resourceMap.getString("jTextField5.text")); // NOI18N
        jTextField5.setName("jTextField5"); // NOI18N

        jTextField6.setText(resourceMap.getString("jTextField6.text")); // NOI18N
        jTextField6.setName("jTextField6"); // NOI18N

        jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N
        jLabel2.setName("jLabel2"); // NOI18N

        jLabel3.setText(resourceMap.getString("jLabel3.text")); // NOI18N
        jLabel3.setName("jLabel3"); // NOI18N

        jScrollPane1.setName("jScrollPane1"); // NOI18N

        jTable1.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null}
            },
            new String [] {
                "Lunes", "Martes", "Miercoles", "Jueves", "Viernes", "Sabado", "Domingo"
            }
        ));
        jTable1.setMaximumSize(new java.awt.Dimension(2147483647, 200));
        jTable1.setMinimumSize(new java.awt.Dimension(300, 200));
        jTable1.setName("jTable1"); // NOI18N
        jScrollPane1.setViewportView(jTable1);

        jButton1.setText(resourceMap.getString("jButton1.text")); // NOI18N
        jButton1.setName("jButton1"); // NOI18N
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        jButton2.setText(resourceMap.getString("jButton2.text")); // NOI18N
        jButton2.setName("jButton2"); // NOI18N
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });

        jButton3.setText(resourceMap.getString("jButton3.text")); // NOI18N
        jButton3.setName("jButton3"); // NOI18N
        jButton3.setAlignmentX(this.getAlignmentX()-30);
        jButton3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });

        jLabel4.setText(resourceMap.getString("jLabel4.text")); // NOI18N
        jLabel4.setName("jLabel4"); // NOI18N

        jTextField7.setText(resourceMap.getString("jTextField7.text")); // NOI18N
        jTextField7.setName("jTextField7"); // NOI18N

        jTextField8.setText(resourceMap.getString("jTextField8.text")); // NOI18N
        jTextField8.setName("jTextField8"); // NOI18N

        jTextField9.setText(resourceMap.getString("jTextField9.text")); // NOI18N
        jTextField9.setName("jTextField9"); // NOI18N

        jTextField10.setText(resourceMap.getString("jTextField10.text")); // NOI18N
        jTextField10.setName("jTextField10"); // NOI18N

        jTextField11.setText(resourceMap.getString("jTextField11.text")); // NOI18N
        jTextField11.setName("jTextField11"); // NOI18N

        jLabel5.setText(resourceMap.getString("jLabel5.text")); // NOI18N
        jLabel5.setName("jLabel5"); // NOI18N

        jLabel6.setText(resourceMap.getString("jLabel6.text")); // NOI18N
        jLabel6.setName("jLabel6"); // NOI18N

        jLabel7.setText(resourceMap.getString("jLabel7.text")); // NOI18N
        jLabel7.setName("jLabel7"); // NOI18N

        jLabel8.setText(resourceMap.getString("jLabel8.text")); // NOI18N
        jLabel8.setName("jLabel8"); // NOI18N

        jLabel9.setText(resourceMap.getString("jLabel9.text")); // NOI18N
        jLabel9.setName("jLabel9"); // NOI18N

        jTextField12.setText(resourceMap.getString("jTextField12.text")); // NOI18N
        jTextField12.setName("jTextField12"); // NOI18N

        jButton4.setText(resourceMap.getString("jButton4.text")); // NOI18N
        jButton4.setName("jButton4"); // NOI18N
        jButton4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton4ActionPerformed(evt);
            }
        });

        jButton5.setText(resourceMap.getString("jButton5.text")); // NOI18N
        jButton5.setName("jButton5"); // NOI18N
        jButton5.setVisible(false);
        jButton5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton5ActionPerformed(evt);
            }
        });

        jButton6.setText(resourceMap.getString("jButton6.text")); // NOI18N
        jButton6.setName("jButton6"); // NOI18N
        jButton6.setVisible(false);
        jButton6.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton5ActionPerformed(evt);
            }
        });

        jButton7.setText(resourceMap.getString("jButton7.text")); // NOI18N
        jButton7.setName("jButton7"); // NOI18N
        jButton7.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton7ActionPerformed(evt);
            }
        });

        jLabel10.setText(resourceMap.getString("jLabel10.text")); // NOI18N
        jLabel10.setName("jLabel10"); // NOI18N

        jRadioButton1.setText(resourceMap.getString("jRadioButton1.text")); // NOI18N
        jRadioButton1.setName("jRadioButton1"); // NOI18N
        jRadioButton1.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                jRadioButton1ItemStateChanged(evt);
            }
        });

        jRadioButton2.setText(resourceMap.getString("jRadioButton2.text")); // NOI18N
        jRadioButton2.setName("jRadioButton2"); // NOI18N
        jRadioButton2.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                jRadioButton2ItemStateChanged(evt);
            }
        });

        jButton8.setText(resourceMap.getString("jButton8.text")); // NOI18N
        jButton8.setName("jButton8"); // NOI18N
        jButton8.setVisible(false);
        jButton8.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton8ActionPerformed(evt);
            }
        });

        jButton9.setText(resourceMap.getString("jButton9.text")); // NOI18N
        jButton9.setName("jButton9"); // NOI18N
        jButton9.setVisible(false);
        jButton9.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton9ActionPerformed(evt);
            }
        });

        jLabel11.setText(resourceMap.getString("jLabel11.text")); // NOI18N
        jLabel11.setName("jLabel11"); // NOI18N
        jLabel11.setVisible(false);

        jButton10.setText(resourceMap.getString("jButton10.text")); // NOI18N
        jButton10.setName("jButton10"); // NOI18N
        jButton10.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton10ActionPerformed(evt);
            }
        });

        jTextField13.setText(resourceMap.getString("jTextField13.text")); // NOI18N
        jTextField13.setName("jTextField13"); // NOI18N

        jLabel12.setText(resourceMap.getString("jLabel12.text")); // NOI18N
        jLabel12.setName("jLabel12"); // NOI18N

        jTextField14.setText(resourceMap.getString("jTextField14.text")); // NOI18N
        jTextField14.setName("jTextField14"); // NOI18N

        jLabel13.setText(resourceMap.getString("jLabel13.text")); // NOI18N
        jLabel13.setName("jLabel13"); // NOI18N

        jLabel14.setText(resourceMap.getString("jLabel14.text")); // NOI18N
        jLabel14.setName("jLabel14"); // NOI18N

        jLabel15.setText(resourceMap.getString("jLabel15.text")); // NOI18N
        jLabel15.setName("jLabel15"); // NOI18N

        jLabel16.setText(resourceMap.getString("jLabel16.text")); // NOI18N
        jLabel16.setName("jLabel16"); // NOI18N

        jCheckBox1.setText(resourceMap.getString("jCheckBox1.text")); // NOI18N
        jCheckBox1.setName("jCheckBox1"); // NOI18N

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(jButton2)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 734, Short.MAX_VALUE)
                                .addComponent(jButton3))
                            .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 780, Short.MAX_VALUE)))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(44, 44, 44)
                        .addComponent(jButton10)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(jTextField14, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jTextField13, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(jLabel12)
                                .addGap(43, 43, 43))
                            .addComponent(jLabel13, javax.swing.GroupLayout.Alignment.TRAILING))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 81, Short.MAX_VALUE)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                                .addComponent(jButton7)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jButton4)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jButton1))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                                .addComponent(jButton5)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jButton6)))))
                .addContainerGap())
            .addGroup(layout.createSequentialGroup()
                .addGap(23, 23, 23)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel1)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel2)
                                    .addComponent(jLabel3))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(jTextField5)
                                    .addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel14)))
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(jLabel10)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jTextField12, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(jLabel15)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jLabel16))
                            .addGroup(layout.createSequentialGroup()
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                    .addComponent(jTextField4, javax.swing.GroupLayout.Alignment.LEADING, 0, 0, Short.MAX_VALUE)
                                    .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE))))))
                .addGap(65, 65, 65)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jCheckBox1)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jRadioButton2)
                            .addComponent(jRadioButton1))
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addGap(66, 66, 66)
                                .addComponent(jLabel4)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jButton9)
                                .addGap(50, 50, 50)
                                .addComponent(jButton8))
                            .addGroup(layout.createSequentialGroup()
                                .addGap(115, 115, 115)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel7)
                                    .addComponent(jLabel8)
                                    .addComponent(jLabel6)
                                    .addComponent(jLabel9)
                                    .addComponent(jLabel5))
                                .addGap(54, 54, 54)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(jTextField9, javax.swing.GroupLayout.DEFAULT_SIZE, 32, Short.MAX_VALUE)
                                    .addComponent(jTextField7, javax.swing.GroupLayout.DEFAULT_SIZE, 32, Short.MAX_VALUE)
                                    .addComponent(jTextField10, javax.swing.GroupLayout.DEFAULT_SIZE, 32, Short.MAX_VALUE)
                                    .addComponent(jTextField11, javax.swing.GroupLayout.DEFAULT_SIZE, 32, Short.MAX_VALUE)
                                    .addComponent(jTextField8, javax.swing.GroupLayout.DEFAULT_SIZE, 32, Short.MAX_VALUE)
                                    .addComponent(jLabel11))))))
                .addGap(154, 154, 154))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel1)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jButton9, 0, 0, Short.MAX_VALUE)
                            .addComponent(jButton8, 0, 0, Short.MAX_VALUE))
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(jTextField7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel5))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(jLabel6)
                                    .addComponent(jTextField8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(jTextField9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel9))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(jTextField10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel7))
                                .addGap(7, 7, 7)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(jTextField11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel8)))
                            .addGroup(layout.createSequentialGroup()
                                .addGap(6, 6, 6)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jRadioButton1)
                                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                        .addComponent(jLabel15)
                                        .addComponent(jLabel16)
                                        .addComponent(jLabel14)))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(layout.createSequentialGroup()
                                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                            .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                            .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                    .addGroup(layout.createSequentialGroup()
                                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jLabel2)
                                            .addGroup(layout.createSequentialGroup()
                                                .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                                    .addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addComponent(jLabel3))))
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                            .addComponent(jLabel10)
                                            .addComponent(jTextField12, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                    .addGroup(layout.createSequentialGroup()
                                        .addComponent(jRadioButton2)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 62, Short.MAX_VALUE)
                                        .addComponent(jCheckBox1)
                                        .addGap(25, 25, 25)))))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel11)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))
                .addGap(66, 66, 66)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 174, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(18, 18, 18)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jButton4)
                            .addComponent(jButton1)
                            .addComponent(jButton7))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jButton6)
                            .addComponent(jButton5))
                        .addGap(52, 52, 52))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 44, Short.MAX_VALUE)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jButton10)
                            .addComponent(jLabel12)
                            .addComponent(jTextField13, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jTextField14, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel13))
                        .addGap(36, 36, 36))))
        );
    }// </editor-fold>//GEN-END:initComponents
    private void actualizar_tabla(List<List<String>[][]> T, int num) { // num es el numero de semana

        if (num < T.size()) {
            List<String>[][] A = T.get(num);

            JTextArea texta = new JTextArea();
            int i = 0;
            while (i < 5) {
                int j = 0;
                while (j < 7) {
                    int z = 0;
                    texta.setText("");
                    String a = "";
                    if (A[i][j] != null) {
                        while (z < A[i][j].size()) { // sale el texto seguido
                            a = a.concat(A[i][j].get(z));
                            a = a.concat(" ");
                            z++;
                        }
                    }
                    texta.setText(a);
                
                    mod1.setValueAt(texta.getText(), i, j);
                    j++;
                }
                i++;
            }
        } else {
            Dialog_error er = new Dialog_error(jFrame1, false, "No hay mas dietas generadas, cambia parametros y pulsa regenerar dieta");
            er.setLocationRelativeTo(null);
            er.setVisible(true);

        }

    }

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        // Accion de generar dieta

    
        semana = 0;

        int[] T = new int[5];
        // comprovacion casillas platos comida
        if (jTextField7.getText().isEmpty()) { // comprovacion casilla 1
            T[0] = 0;
        } else {
            T[0] = Integer.parseInt(jTextField7.getText());
        } // TextFields numero platos comida

        if (jTextField8.getText().isEmpty()) { // comprovacion casilla 2
            T[1] = 0;
        } else {
            T[1] = Integer.parseInt(jTextField8.getText());
        }

        if (jTextField9.getText().isEmpty()) { // comprovacion casilla 3
            T[2] = 0;
        } else {
            T[2] = Integer.parseInt(jTextField9.getText());
        }

        if (jTextField10.getText().isEmpty()) { // comprovacion casilla 4
            T[3] = 0;
        } else {
            T[3] = Integer.parseInt(jTextField10.getText());
        }

        if (jTextField11.getText().isEmpty()) { // comprovacion casilla 5
            T[4] = 0;
        } else {
            T[4] = Integer.parseInt(jTextField11.getText());
        }

        // comprovacion fechas

        int j = 0;
        boolean r = false;
        while (j < 6 && !r) {
            switch (j) {
                case 0:
                    r = jTextField1.getText().equals("");
                    break;
                case 1:
                    r = jTextField2.getText().equals("");
                    break;
                case 2:
                    r = jTextField3.getText().equals("");
                    break;
                case 3:
                    r = jTextField4.getText().equals("");
                    break;
                case 4:
                    r = jTextField5.getText().equals("");
                    break;
                case 5:
                    r = jTextField6.getText().equals("");
                    break;
            }
            j++;
        }

        if (!r) {
            Date fech_ini = new Date(Integer.parseInt(jTextField1.getText()), Integer.parseInt(jTextField3.getText()), Integer.parseInt(jTextField5.getText()));
            Date fech_f = new Date(Integer.parseInt(jTextField2.getText()), Integer.parseInt(jTextField4.getText()), Integer.parseInt(jTextField6.getText()));

            if (fech_ini.before(fech_f) || fech_ini.equals(fech_f)) { // la fecha de inicio es antes que la de fin     
                
                try {
                    if (jRadioButton1.isSelected()) { // totales seleccionado
                        tab.remove(tab.get(tab.size() - 1));
                        tab.add(T);
                        U = CVd.gen_dieta2(fech_ini, fech_f, dietanum, tab, dias,jCheckBox1.isSelected());
                        jButton5.setVisible(true); // mostramos los botones de aceptar
                        jButton6.setVisible(true); // y cancelar
                        jButton10.setEnabled(false);
                    } else if (jRadioButton2.isSelected()) { // por dia seleccionado
                        U = CVd.gen_dieta(fech_ini, fech_f, dietanum, T, Integer.parseInt(jTextField12.getText()),jCheckBox1.isSelected());
                        jButton5.setVisible(true); // mostramos los botones de aceptar
                        jButton6.setVisible(true); // y cancelar
                        jButton10.setEnabled(false);
                    }


                } catch (Exception e) {
                    System.out.println("Exception generacion de dieta " + e.getMessage());
                    Dialog_error er = new Dialog_error(jFrame1, true, e.getMessage());
                    er.setLocationRelativeTo(null);
                    er.setVisible(true);
                }
                actualizar_tabla(U, semana);
                dietanum++;
            } else {
                System.out.println("La fecha de inicio debe ser anterior a la de fin");
                Dialog_error er = new Dialog_error(jFrame1, true, "La fecha de inicio debe ser anterior a la de fin");
                er.setLocationRelativeTo(null);
                er.setVisible(true);
            }

            
        } else {
            Dialog_error er = new Dialog_error(jFrame1, true, "No pueden existir fechas vacias");
            er.setLocationRelativeTo(null);
            er.setVisible(true);

        }
        
    }//GEN-LAST:event_jButton1ActionPerformed

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        // Pasar las pantallas de dietas, por semanas 

        if (evt.getActionCommand().equals(">")) {
            if (U.size() > (semana + 1)) {
                semana++;
                actualizar_tabla(U, semana);
            }
        } else {
            if (semana != 0) {
                semana--;
                actualizar_tabla(U, semana);
            }
        }
        
        
    }//GEN-LAST:event_jButton2ActionPerformed

    private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed
        // accion consultar dieta

        semana = 0;

        Date fech_ini = new Date(Integer.parseInt(jTextField1.getText()), Integer.parseInt(jTextField3.getText()), Integer.parseInt(jTextField5.getText()));
        Date fech_f = new Date(Integer.parseInt(jTextField2.getText()), Integer.parseInt(jTextField4.getText()), Integer.parseInt(jTextField6.getText()));

        if (fech_ini.before(fech_f) || fech_ini.equals(fech_f)) { // la fecha de inicio es antes que la de fin     

            try {
                U = CVd.cons_dieta(fech_ini, fech_f);
            } catch (Exception e) {
                System.out.println(e.getMessage());
            }

            actualizar_tabla(U, semana);
            try{
            actualizar_titulos(CVd.listafechas());
            }
            catch(Exception e){
            System.out.println("Error actualizando los titulos");
            }

        } else {
            System.out.println("La fecha de inicio debe ser anterior a la de fin");
            Dialog_error er = new Dialog_error(jFrame1, false, "La fecha de inicio debe ser anterior a la de fin");
            er.setLocationRelativeTo(null);
            er.setVisible(true);
        }
        
        
    }//GEN-LAST:event_jButton4ActionPerformed

    private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton5ActionPerformed
        // Aceptar o cancelar la dieta generada

        if (evt.getActionCommand().equals("Aceptar")) {
            try {
                CVd.aceptar_dieta();
                dietanum = 0;
                diac = 0;
                jLabel11.setText("");
                jButton8.setEnabled(true);
                jButton9.setEnabled(true);
                
                // Borro las casillas cuando acepto
                jButton5.setVisible(false);
                jButton6.setVisible(false);
                jTextField7.setText("");
                jTextField8.setText("");
                jTextField9.setText("");
                jTextField10.setText("");
                jTextField11.setText("");
                jButton10.setEnabled(true);
            } catch (Exception e) {
                System.out.println(e.getMessage());
            }
        } else {
            CVd.cancelar_dieta();
            U = new ArrayList();  // Borrar la tabla
            List<String>[][] I = new ArrayList[5][7];
            U.add(I);
            actualizar_tabla(U, 0);
            
            if(jRadioButton1.isSelected()){
            buttonGroup1.clearSelection();
            diac = 0;
            }
            jButton10.setEnabled(true);
        }

        jButton5.setVisible(false);
        jButton6.setVisible(false);
        jCheckBox1.setSelected(false);
        
        
        
    }//GEN-LAST:event_jButton5ActionPerformed

    private void jRadioButton1ItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jRadioButton1ItemStateChanged
        // Seleccionar totales
      
        if (!jTextField12.getText().equals("")) {
          if(Integer.parseInt(jTextField12.getText()) > 1){  
            tab = new ArrayList();
            jButton8.setVisible(true);
            jButton9.setVisible(true);

            jButton9.setEnabled(false); // desactivo boton izquierdo
            jButton8.setEnabled(true);  // activo boton derecho

            jLabel11.setVisible(true);
            jLabel11.setText("dia: " + Integer.toString(diac));
            dias = Integer.parseInt(jTextField12.getText());
            int[] P = {0, 0, 0, 0, 0};
            int y = 0;
      
            while (y < dias) {
                tab.add(P);
                y++;
            }
            
          }
          else{
              buttonGroup1.clearSelection(); // seria mejor seleccionar por dia
              jRadioButton2.setSelected(true); // marcamos por dia
          }
        } else {
            Dialog_error er = new Dialog_error(jFrame1, false, "No hay dias indicados");
            er.setLocationRelativeTo(null);
            er.setVisible(true);
        }
        
    }//GEN-LAST:event_jRadioButton1ItemStateChanged

    private void jRadioButton2ItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jRadioButton2ItemStateChanged
        // Seleccionar por dia


        if (dias - 1 != diac) {
            jButton8.setEnabled(true);
        }

        
        jButton8.setVisible(false);
        jButton9.setVisible(false);
        jLabel11.setVisible(false);
        
    }//GEN-LAST:event_jRadioButton2ItemStateChanged

    private void jButton8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton8ActionPerformed
        // funcion > de tbit
        
        int[] T = new int[5];


        if (jTextField7.getText().isEmpty()) { // comprovacion casilla 1
            T[0] = 0;
        } else {
            T[0] = Integer.parseInt(jTextField7.getText());
        } // TextFields numero platos comida

        if (jTextField8.getText().isEmpty()) { // comprovacion casilla 2
            T[1] = 0;
        } else {
            T[1] = Integer.parseInt(jTextField8.getText());
        }

        if (jTextField9.getText().isEmpty()) { // comprovacion casilla 3
            T[2] = 0;
        } else {
            T[2] = Integer.parseInt(jTextField9.getText());
        }

        if (jTextField10.getText().isEmpty()) { // comprovacion casilla 4
            T[3] = 0;
        } else {
            T[3] = Integer.parseInt(jTextField10.getText());
        }

        if (jTextField11.getText().isEmpty()) { // comprovacion casilla 5
            T[4] = 0;
        } else {
            T[4] = Integer.parseInt(jTextField11.getText());
        }

        tab.set(diac, T);
        diac++;

        //actualizar casillas
        if (tab.get(diac)[0] == 0) {
            jTextField7.setText("");
        } else {
            jTextField7.setText(Integer.toString(tab.get(diac)[0]));
        }

        if (tab.get(diac)[1] == 0) {
            jTextField8.setText("");
        } else {
            jTextField8.setText(Integer.toString(tab.get(diac)[1]));
        }

        if (tab.get(diac)[2] == 0) {
            jTextField9.setText("");
        } else {
            jTextField9.setText(Integer.toString(tab.get(diac)[2]));
        }

        if (tab.get(diac)[3] == 0) {
            jTextField10.setText("");
        } else {
            jTextField10.setText(Integer.toString(tab.get(diac)[3]));
        }

        if (tab.get(diac)[4] == 0) {
            jTextField11.setText("");
        } else {
            jTextField11.setText(Integer.toString(tab.get(diac)[4]));
        }

        jLabel11.setText("dia: " + Integer.toString(diac));

        // Si ya nos encontramos en la ultima casilla escondemos siguiente

        if (dias - 1 == diac) {
            jButton8.setEnabled((false));
        }
        if (diac > 0) {
           
            jButton9.setEnabled(true);
        }
        
        
    }//GEN-LAST:event_jButton8ActionPerformed

    private void jButton9ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton9ActionPerformed
        // funcion < de tbit
        
        diac--;

        if (dias - 1 > diac) {
            jButton8.setEnabled(true);
        }
        if (diac == 0) {
            jButton9.setEnabled(false);
        }

        jLabel11.setText("dia: " + Integer.toString(diac));

        if (tab.get(diac)[0] == 0) {
            jTextField7.setText("");
        } else {
            jTextField7.setText(Integer.toString(tab.get(diac)[0]));
        }

        if (tab.get(diac)[1] == 0) {
            jTextField8.setText("");
        } else {
            jTextField8.setText(Integer.toString(tab.get(diac)[1]));
        }

        if (tab.get(diac)[2] == 0) {
            jTextField9.setText("");
        } else {
            jTextField9.setText(Integer.toString(tab.get(diac)[2]));
        }

        if (tab.get(diac)[3] == 0) {
            jTextField10.setText("");
        } else {
            jTextField10.setText(Integer.toString(tab.get(diac)[3]));
        }

        if (tab.get(diac)[4] == 0) {
            jTextField11.setText("");
        } else {
            jTextField11.setText(Integer.toString(tab.get(diac)[4]));
        }
        
    }//GEN-LAST:event_jButton9ActionPerformed

    private void jButton10ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton10ActionPerformed
        // Calcular precio de la dieta
        
        try {
            int euros = CVd.calculo();
            int cal = CVd.calculo2();
            
            jTextField13.setText(Integer.toString(euros));
            jTextField14.setText(Integer.toString(cal));
        } catch (Exception e) {
            Dialog_error er = new Dialog_error(jFrame1, false, "Error calculando precio dieta");
            er.setLocationRelativeTo(null);
            er.setVisible(true);
        }
        
    }//GEN-LAST:event_jButton10ActionPerformed

    private void jButton7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton7ActionPerformed
        // Rehacer dieta (borra las casillas):
        buttonGroup1.clearSelection();
        dietanum=0;
    }//GEN-LAST:event_jButton7ActionPerformed

    private DefaultTableModel inicializa_modelo() {
        String[] T = {"Lunes", "Martes", "Miercoles", "Jueves", "Viernes", "Sabado", "Domingo"};
        mod1.setColumnIdentifiers(T);

        return mod1;
    }
    
    private void actualizar_titulos(List<Date> I)
    {
  
     Date fech_ini = new Date(Integer.parseInt(jTextField1.getText()), Integer.parseInt(jTextField3.getText()), Integer.parseInt(jTextField5.getText()));
     Date fech_f = new Date(Integer.parseInt(jTextField2.getText()), Integer.parseInt(jTextField4.getText()), Integer.parseInt(jTextField6.getText()));    
    
     int k = 0;
     while(k < I.size() && I.get(k).before(fech_ini)){
     k++;        
     }
     
     
    }
            
            
            
    private CtrlVistadieta CVd;
    private CtrlVistaCliente CVc;
    private CtrlVistalimento CVa;
    private CtrlVistaplato CVp;
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton10;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton3;
    private javax.swing.JButton jButton4;
    private javax.swing.JButton jButton5;
    private javax.swing.JButton jButton6;
    private javax.swing.JButton jButton7;
    private javax.swing.JButton jButton8;
    private javax.swing.JButton jButton9;
    private javax.swing.JCheckBox jCheckBox1;
    private javax.swing.JFrame jFrame1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JRadioButton jRadioButton1;
    private javax.swing.JRadioButton jRadioButton2;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTable jTable1;
    private javax.swing.JTextField jTextField1;
    private javax.swing.JTextField jTextField10;
    private javax.swing.JTextField jTextField11;
    private javax.swing.JTextField jTextField12;
    private javax.swing.JTextField jTextField13;
    private javax.swing.JTextField jTextField14;
    private javax.swing.JTextField jTextField2;
    private javax.swing.JTextField jTextField3;
    private javax.swing.JTextField jTextField4;
    private javax.swing.JTextField jTextField5;
    private javax.swing.JTextField jTextField6;
    private javax.swing.JTextField jTextField7;
    private javax.swing.JTextField jTextField8;
    private javax.swing.JTextField jTextField9;
    // End of variables declaration//GEN-END:variables
    private DefaultTableModel mod1; // Modelo de la tabla
    // estructura para generar dieta y consulta
    private int semana; // semana que estoy viendo
    private int dietanum; // numero de dieta vista de las generadas
    private List<List<String>[][]> U = new ArrayList(); // valores tabla
    // estructuras para generar dieta de comidas por plato totales
    private List<int[]> tab;
    private int dias;
    private int diac;
    /*
    jTextField1 = año fecha inicio
    jTextField2 = año fecha fin
    jTextField3 = mes fecha inicio
    jTextField4 = mes fecha fin
    jTextField5 = dia fecha inicio
    jTextField6 = dia fecha fin
     */
}
